import React from "react"
import {
  StyleSheet,
  View,
  Text
} from "react-native"

import CardHeader from "./header"
import CardFooter from "./footer"

class Component extends React.PureComponent {
  constructor (props) {
    super(props)
  }

  render() {
    const item = this.props.data

    return (
      <View style={styles.card}>
        <CardHeader user={item.user || {}}></CardHeader>

        <View style={styles.wapper}>
          <Text style={styles.content}>{item.t}</Text>
        </View>

        <CardFooter data={item}></CardFooter>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  card: {
    backgroundColor: 'white',
    borderBottomWidth: 8,
    borderColor: '#F3F3F3',
  },
  wapper: {
    paddingVertical: 0,
    paddingHorizontal: 10,
  },
  content: {
    color: '#2D3748',
    fontSize: 16,
    lineHeight: 22,
  }
})

export default Component
